package com.scau.classOnline.dao;

import com.scau.classOnline.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    Comment selectByPrimaryKey(Integer id);

    List<Comment> selectAll();

    int updateByPrimaryKey(Comment record);

    List<Comment> selectByCId(@Param("cid") Integer cid, @Param("offset") Integer offset);

    List<Comment> selectByCIdBetweenStar(@Param("cid") Integer cid,@Param("offset") Integer offset,@Param("start") Integer start,@Param("end") Integer end);

    Comment selectByCIdAndSId(@Param("cid") Integer cid,@Param("sid") Integer sid);

    int selectTotolNumByCId(@Param("cid") Integer cid);

    int selectFavNumByCId(@Param("cid") Integer cid,@Param("start") Integer fs,@Param("end") Integer fe);

}